<?php
/**
 * 问题处理进度
 */
class Application_Model_ProblemSchedule extends Application_Model_DomainObject {

    protected  $_id;

    protected $_wayId;

    protected $_operateName;

    protected $_content;

    protected $_schedule;

    protected $_dateCreated;
    
    protected $_type;
    /**
     * 国际运单
     */
    const Type_Bill = 1;
    /**
     * 上门取件
     */
    const Type_Visiting = 2;
    
    public static function getTypeWayIdBySchedule($wayId,$type = Application_Model_ProblemSchedule::Type_Bill)
    {
        $where[" wayId = "] = $wayId;
        $where[" and type = "] = $type;
        $where[" and (schedule < "] = Application_Model_ProblemWay::Schedule_Reason;
        $where[" or schedule is null ) and "] = 1;
        return self::getDao()->queryAll($where," dateCreated desc ");
    }
    
    public static function getByWayId($wayId)
    {
        return self::getDao()->queryAll(array(" wayId = "=>$wayId," and schedule >= 0 and "=>1));
    }
}